package org.demo.pattern.vistor;

import java.util.List;

/**
 * 
 * @author  
 * @date    2011-5-17
 * @file    org.demo.pattern.vistor.ConcreteVisitor.java
 */
public class ConcreteVisitor implements Visitor{

	@Override
	public void visitFloat(FloatElement f) {
		System.out.println("float: " + f.getValue());
	}

	@Override
	public void visitString(StringElement str) {
		System.out.println("String: " + str.getValue());
	}

	@Override
	public void visitList(List<Visitable> list) {
		for (Visitable v : list){
			v.accept(this);
		}
	}

}
